<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8"/>
	<title>我的帐户 - {pigcms{$config.site_name}</title>
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
	<link rel="icon" href="/favicon.ico" type="image/x-icon" />
	<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />	
	<link type="text/css" href="{pigcms{$static_path}css/common.css" rel="stylesheet" />
	
	
	<link rel="stylesheet" type="text/css" href="{pigcms{$static_path}css/account.css" />
    <link rel="stylesheet" type="text/css" href="{pigcms{$static_path}css/sell-domain.css" />

	<script src="{pigcms{$static_path}plugs/sweetalert/dist/sweetalert.min.js"></script>
	<link rel="stylesheet" type="text/css" href="{pigcms{$static_path}plugs/sweetalert/dist/sweetalert.css">

	<link rel="stylesheet" type="text/css" href="{pigcms{$static_path}css/skin.css" />
</head>
<body class="s-bg-global">
	<include file="Public:header"/>
	<include file="Public:nav"/>
	<div class="s-bg-f7">
		<div class="g-position">
			<div class="m-position u-fl">
				<ol>
					<li>当前位置：&nbsp;</li>
					<li><a href="{pigcms{$config.site_url}" class="s-2a">首页</a>&nbsp;&gt;&nbsp;</li>
					<li>我的账户</li>
				</ol>
			</div>
			<div class="m-serverTime u-fr">
				服务器时间：<span id="mytime">{pigcms{$_SERVER.REQUEST_TIME|date='Y-m-d H:i:s',###}</span>&nbsp;(CST&nbsp;+08:00)
			</div>
			<div class="u-cls"></div>
		</div>
	</div>
	<div class="g-content u-cls">
    <div class="m-content">
		<include file="Account:sidebar"/>
        <!-- 右边 -->
        <div class="u-fr">
			<!-- 标题&验证 -->
            <div class="s-bg-fc u_be9" style="width: 702px;">
                <div class="m-ta s-bg-white">
                    <div class="title">
                        <a class="s-3c" href="javascript:void(0)">
                            <span>账号安全</span>
                        </a>
                    </div>
                    <div class="u-cls"></div>
                </div>
            </div>
            <!-- 选项卡 -->
            <div class="m-acc-select u_be9 s-bg-white">
                <!-- 标题 -->
                <include file="Account:safe_nav"/>
                
                    <div class="m-acc-cons s-bg-fc u_mall1">
                        <div class="m-inse">
                            <p class="f-p-t14">绑定后，您可以通过手机号登陆，并可以通过手机找回密码。</p><br />
                            <p class="u_mb15 s-ff6 u_fw">请注意：</p>
                            <p>手机和邮箱同时绑定才能解绑</p>
                        </div>
                    </div>
	            <if condition="$get_user_info['is_check_phone'] eq 0">
                    <form action="{pigcms{:U('Account/bindphone')}" method='post' id="check_from">
	                    <input type="hidden" name="is_check_phone" value="{pigcms{$get_user_info['is_check_phone']}">
	                    <div class="m-question s-bg-fc u_be9">
		                    <ul>
			                    <li class="u_mb15">
				                    <div class="question_txt">您绑定的手机：</div>
				                    <div class="question_ipt s-bg-white">
					                    <input type="text" ph="请输入您的手机号" value="{pigcms{$get_user_info.phone}" name='phone' id="phone"  <if condition="$get_user_info['is_check_phone'] eq 1"> readonly="readonly" </if> />
				                    </div>
				                    <div class="question_btn">
					                    <input type="button" value="获取验证码" data-expire_time="{pigcms{$expire_time}"  class="u-btn2 s-bg-2a" id="expire_time_button"   onclick="getCode();return false;"/>
				                    </div>
				                    <div class="u-cls"></div>
			                    </li>
			                    <li class="u_mb15">
				                    <div class="question_txt">验证码：</div>
				                    <div class="question_ipt s-bg-white">
					                    <input type="text" name='txtcode' />
				                    </div>
				                    <div class="u-cls"></div>
			                    </li>
			                    <li>
				                    <div class="u_mall12">
					                    <input type="submit" value="手机绑定" class="u-btn12 s-bg-2a" />
				                    </div>
			                    </li>
		                    </ul>
	                    </div>
                    </form>
		            <else />
		            <div class="m-question s-bg-fc u_be9">
			            <ul>
				            <li class="u_mb15">
					            <div class="question_txt">您绑定的手机：</div>
					            <div class="question_ipt s-bg-white">
						            <input type="text" ph="请输入您的手机号" value="{pigcms{$get_user_info.phone}" name='phone' id="phone"  <if condition="$get_user_info['is_check_phone'] eq 1"> readonly="readonly" </if> />
					            </div>

					            <div class="u-cls"></div>
				            </li>
			            </ul>
		            </div>
		            </if>
            </div>

        </div>
		
       <div class="u-cls"></div>
    </div>
</div>
	<include file="Public:footer"/>
	<include file="Public:account_footer"/>
	<script>
		var get_code_url = "{pigcms{:U('Account/sendCode')}";

		function getCode(obj){
			var check_phone = $("#phone").val();
				$.post(get_code_url,{phone:check_phone},function(result){
					result = $.parseJSON(result);
					if(result){
						//alert(result.expire_time);
						if(result.error == 0){
							swal('','获取验证码成功，请及时输入校验码','success');
//							setTimeout(function(){
//								//window.location.reload();
//								//alert('dis');
//								//$('#expire_time_button').attr('disabled','disabled');
//							},1000);
						}else{
							//$('#login_'+result.dom_id).focus();
							swal({   title: '获取验证码成功出现错误' ,   text: result.msg ,type:"error",   timer: 3000,   showConfirmButton: true });
						}
					}else{
						swal('','获取验证码出现异常，请重试！','error');
					}
				});
			//}
		}

	</script>
	<include file="Public:sidebar"/>
</body>
</html>
